package com.lcy.web.model.sql.base.mine;

/**
 * Created by loucunyin on 2016/12/7 0007.
 */
public interface SqlTemplate {

    String SELECT_ALL = "select * from %s";
    String SELECT_COLUMNS = "select %s from %s";
    String VALUE = "'%s'";
    String COUNT = "select count(%s) from %s";

    String selectAll();
    String selectColumns(String[] columns);

    String selectByColumn(String column, Object value);
    String selectByColumn(SelectCondition condition);
    String selectByColumns(SelectCondition[] conditions);
    String selectByColumns(String[] columns, SelectCondition[] conditions);

    String selectPage(String sql, int page, int pageSize);
    String limit(String sql, int start, int end);
    String limit(String sql, int size);
    String selectCount();
    String selectCount(String column);

    String deleteByColumn(String column, Object value);
    String deleteByColumn(SelectCondition conditions);
    String deleteByColumns(SelectCondition[] conditions);
}
